<template>
  <div class="change-pass">
    <form class="form">
      <div class="input-item">
        <label>原密码</label>
        <div class="input-item-content">
          <input placeholder type="text" name id />
          <span></span>
          <span></span>
        </div>
      </div>
      <div class="input-item">
        <label>新密码</label>
        <div class="input-item-content">
          <input placeholder type="text" name id />
          <span></span>
          <span></span>
        </div>
      </div>
      <div class="input-item">
        <label>确认新密码</label>
        <div class="input-item-content">
          <input placeholder type="text" name id />
          <span></span>
          <span></span>
        </div>
      </div>
      <div class="input-item submit">
        <el-button class="submit-btn" type="primary">保存</el-button>
        <el-button @click="close" class="submit-close-btn" plain>取消</el-button>
      </div>
    </form>
  </div>
</template>
<script>
import { Button } from "element-ui";
export default {
  components: {
    ElButton: Button
  },
  data() {
    return {
      canSendCode: false,
      codeTimer: 30
    };
  },
  methods: {
    close() {
      this.$emit("close-changPass");
    }
  }
};
</script>
<style lang="scss" scoped>
.change-pass {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.3);
}
.form {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background-color: #fff;
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  top: 30%;
  left: 50%;
  margin-left: -250px;
  width: 500px;
  height: 300px;
  .input-item {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 30px;
    label {
      margin-left: 25px;
      width: 80px;
      font-size: 15px;
      text-align: right;
      padding-right: 20px;
      color: #455a64;
    }
    .input-item-content {
      position: relative;
      width: 65%;
      height: 100%;
      input,
      textarea {
        color: #606266;
        width: 100%;
        height: 25px;
        padding: 7px 0;
        font-size: 16px;
        outline: none;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        background: #fff;
        letter-spacing: 1px;
        &:focus ~ span {
          transform: scaleX(1);
        }
      }
      span:nth-of-type(1) {
        position: absolute;
        bottom: 0;
        left: 0;
        transform: scaleX(0);
        transition: all 0.3s ease-in-out;
        transform-origin: right center;
        width: 50%;
        height: 3px;
        background-color: rgba(179, 233, 114, 0.829);
      }
      span:nth-of-type(2) {
        position: absolute;
        transform: scaleX(0);
        transition: all 0.3s ease-in-out;
        transform-origin: left center;
        bottom: 0;
        right: 0;
        width: 50%;
        height: 3px;
        background-color: rgba(179, 233, 114, 0.9);
      }
    }
  }
  .submit {
    margin: 0;
    justify-content: center;
    .submit-btn {
      background-color: #409eff;
      border-color: #409eff;
      &:hover {
        background-color: rgb(111, 183, 255);
        border-color: rgb(111, 183, 255);
      }
    }
  }
}
</style>